<template>
  <div>
    <ly-dialog
      :model-value="dialogVisible"
      :title="loadingTitle"
      width="560px"
      :before-close="handleClose"
    >
      <screen ref="RefScreenTrues" :inline="false"></screen>
      <template #footer>
        <el-button @click="handleClose" :loading="loadingSave">取消</el-button>
        <el-button @click="handleEdit()" icon="Refresh">重置</el-button>
        <el-button
          type="primary"
          icon="Search"
          @click="submitData"
          :loading="loadingSave"
          :disabled="loadingTitle == '详情'"
          >查询</el-button
        >
      </template>
    </ly-dialog>
  </div>
</template>
  
  <script>
import LyDialog from "@/components/dialog/dialog.vue";
import screen from "@/components/screen/screen.vue";

export default {
  components: { LyDialog, screen },

  props: {
    dialogVisible: {
      type: Boolean,
      default: false,
    },
  },
  computed: {
    
  },
  data() {
    return {
       
      loadingTitle: "搜索",
      loadingSave: false,
    };
  },
  computed: {
    formInline() {
      return this.$refs.RefScreenTrues ? this.$refs.RefScreenTrues.formInline : {};
    }
  },
  methods: {
    handleClose() {
      this.loadingSave = false;
      console.log(this.formInline);
      this.$emit("refreshData");
    },
    submitData() {
      // 提交数据的逻辑
      this.$emit("search");
    },
    handleEdit() {
      // 重置handleClose
      this.handleClose();
      this.$emit("handleEdit");
    },
    formInlines(){
        return this.$refs.RefScreenTrues.formInline;
    },
    reset() {
      // 数据清空
      return this.$refs.RefScreenTrues.reset();
    }, 

    returned() {
      // 数据返回
     return this.$refs.RefScreenTrues.returned();
    },
  },
};
</script>
  